﻿<Window x:Class="SoftTeach.View.Sitzpläne.EditRaumplanDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:SoftTeach.Resources.Controls"
        Title="Frage ..." 
      Height="700" 
      Width="850"
        ResizeMode="NoResize"
        WindowStyle="SingleBorderWindow"
        PreviewKeyDown="WindowPreviewKeyDown">
  <Window.Resources>
    <ResourceDictionary>
      <TextBlock x:Key="CursorRotate" Cursor="/SoftTeach;component/Resources/Cursors/Rotate.cur"/>
      <TextBlock x:Key="CursorCopy" Cursor="/SoftTeach;component/Resources/Cursors/Copy.cur"/>
    </ResourceDictionary>
  </Window.Resources>
  <Grid Background="{x:Static SystemColors.ControlDarkBrush}">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*" MinHeight="500"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <controls:SmallDialogHeader Grid.Row="0" Title="Bitte bearbeiten Sie den Raumplan. Sitzplätze werden mit der Maus eingezeichnet. Taste 'Strg' kopiert."
                                      Icon="/SoftTeach;component/Images/Raumplan32.png"/>

    <StackPanel Grid.Row="1" Orientation="Horizontal"  Background="{x:Static SystemColors.MenuBarBrush}">
      <Button Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Command="{Binding Raumplan.OpenImageFileCommand}" 
                    ToolTip="Neuen Grundriss laden">
        <StackPanel Orientation="Horizontal">
          <Grid>
            <Image Source="/SoftTeach;component/Images/Raumplan32.png"/>
            <Image Source="/SoftTeach;component/Images/FolderOpen16.png" Width="16" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
          </Grid>
          <Label Padding="5,0,0,0" VerticalContentAlignment="Center">Neuen Grundriss laden (800x500px, 96dpi)</Label>
        </StackPanel>
      </Button>
      <Border BorderThickness="1" Margin="5" BorderBrush="{x:Static SystemColors.ControlDarkDarkBrush}" />
      <Label  Content="Bezeichnung des Raumplans" VerticalAlignment="Center"/>
      <TextBox  Margin="3"  Style="{StaticResource HeaderTextBox}" TabIndex="1"  VerticalAlignment="Center" MinWidth="200" Text="{Binding Raumplan.RaumplanBezeichnung}"/>
    </StackPanel>
    <Canvas Name="RaumplanCanvas" Width="800" Height="500" 
            Grid.Row="2" 
            PreviewMouseLeftButtonDown="Canvas_PreviewMouseLeftButtonDown"
            PreviewMouseMove="Canvas_PreviewMouseMove" 
            PreviewMouseLeftButtonUp="Canvas_PreviewMouseLeftButtonUp"
            PreviewMouseRightButtonDown="Canvas_PreviewMouseRightButtonDown">
      <Image Source="{Binding Raumplan.RaumplanImage}" Stretch="None" />
    </Canvas>
    <Grid Background="{StaticResource DefaultButtonsBackgroundBrush}" Grid.Row="3">
      <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="10">
        <Button Width="100" IsDefault="True" Click="OkClick" TabIndex="2">OK</Button>
        <Button Width="100" IsCancel="True" Click="CancelClick" TabIndex="2" Margin="10,0,0,0">Abbruch</Button>
      </StackPanel>
    </Grid>
  </Grid>
</Window>
